<div class="layui-col-xs12">
    <div class="layui-btn-container">
        <button class="layui-btn" onclick="window.location.reload()"><i class="layui-icon">&#xe669;</i></button>
        {foreach $toolbardemo as $value}
        {if $value['type']=='alldel'}
        <button class="layui-btn layui-btn-danger demoTable {$value['class']}" style="{$value['style']}" lay-event="alldel" data-action="{$value['action']}">{$value['desc']|default="全部删除"}</button>
        {/if}

        {if $value['type']=='add'}
        <button class="layui-btn layui-btn-normal demoTable {$value['class']}" style="{$value['style']}" lay-event="add" data-action="{$value['action']}">{$value['desc']|default="添加"}</button>
        {/if}

        {if $value['type']=='back'}
        <button class="layui-btn layui-btn-normal demoTable {$value['class']}" style="{$value['style']}" lay-event="back" data-action="{$value['action']}">{$value['desc']|default="返回"}</button>
        {/if}

        {if $value['type']=='text'}
        <button class="layui-btn {$value['class']}" style="{$value['style']}">{$value['desc']|default="没设置"}</button>
        {/if}

        {if $value['type']=='export'}
        <button class="layui-btn demoTable {$value['class']}" style="{$value['style']}" lay-event="export" data-action="{$value['action']}">{$value['desc']|default="导出"}</button>
        {/if}

        {if $value['type']=='a'}
        <a href="{$value['action']}" class="layui-btn{$value['class']}" style="{$value['style']}">{$value['desc']|default="没设置"}</a>
        {/if}

        {if $value['type']=='button'}
        <button data-action="{$value['action']}" class="demoTable layui-btn{$value['class']}" lay-event="mybuttons" style="{$value['style']}">{$value['desc']|default="没设置"}</button>
        {/if}
        {/foreach}
    </div>
</div>
<div class="layui-col-xs12">
    <div class="layui-form-item">
    <form method="post" id="myforms" class="layui-form" style="width: 100%">
    {php}$xx = 0;{/php}
    {foreach $toolbardemo as $value}
    {if $value['type']=='search'}
        {foreach $value['option'] as $va}
        {php}$xx = 1;{/php}
            {if $va['data']}
        <div class="mysousuo">
            <label class="layui-form-label">{$va['field_name']}:</label>
            <div class="layui-input-inline">
            <select class="layui-select mysousuo layui-inline" style="float: left;" name="{$va['field']}" lay-filter="" lay-search>
                <option value="">请选择</option>
                {foreach $va['data'] as $ss}
                <option value="{$ss['id']}">{$ss[$va['option']]??$ss['name']}</option>
                {/foreach}
            </select>
            </div>
        </div>
            {else}
            <div class="mysousuo"><label class="layui-form-label">{$va['field_name']}:</label><input type="text" class="layui-select myinput layui-input-inline" name="{$va['field']}"></div>
            {/if}
        {/foreach}
    {/if}
    {/foreach}
    {foreach $toolbardemo as $value}
    {if $value['type']=='times'}
<!--    <div class="layui-col-xs4 layui-col-xs-offset1">-->
<!--        <select class="layui-col-xs2 layui-select" id="timefild" lay-ignore>-->
<!--            <option value="">选择字段</option>-->
            {foreach $value['option'] as $va}
        {php}$xx = 1;{/php}
        <div class="mysousuo">
            <label class="layui-form-label">{$va['field_name']}:</label><input type="text" class="layui-select myinput layui-input-inline times" name="{$va['field']}|start" id="{$va['field']}1">-<input type="text" id="{$va['field']}2" class="layui-select myinput layui-inline times" style="height: 38px" name="{$va['field']}|end">
        </div>
<!--            <option value="{$va['field']}">{$va['field_name']}</option>-->
            {/foreach}
<!--        </select>-->
<!--        <div class="layui-col-xs2" style="margin-left: 4px">-->
<!--            <input type="text" class="layui-input" id="time1">-->
<!--        </div>-->
<!--        <div class="layui-col-xs1" style="line-height: 38px;text-align: center">到</div>-->
<!--        <div class="layui-col-xs2">-->
<!--            <input type="text" class="layui-input" id="time2">-->
<!--        </div>-->
<!--        <div class="layui-col-xs1" style="margin-left: 5px"><button  class="layui-btn demoTable" lay-event="reload">{$value['desc']|default="确定"}</button></div>-->
<!--    </div>-->
    {/if}
    {/foreach}
        {if $xx==1}
        <input class="layui-btn demoTable layui-col-xs2" style="margin-left: 5px;width: 100px" type="button" lay-event="reload" value='{$value['desc']|default="搜索"}'></input>
        {/if}
    </form>
    </div>
</div>